package com.qingneng.service.sdk.impl;

import java.util.List;

import com.qingneng.dao.CustomerInfoDAO;
import com.qingneng.service.sdk.ICustomerInfoService;
import com.qingneng.vo.CustomerInfo;
import com.tbfs.util.PaginationBean;
import com.tbfs.util.PaginationContext;

public class CustomerInfoServiceImpl implements ICustomerInfoService {

	private CustomerInfoDAO customerInfoDao;
	
	public CustomerInfoDAO getCustomerInfoDao() {
		return customerInfoDao;
	}

	public void setCustomerInfoDao(CustomerInfoDAO customerInfoDao) {
		this.customerInfoDao = customerInfoDao;
	}

	public List getCustomerList(CustomerInfo bean) {
		// TODO Auto-generated method stub
		PaginationBean pageBean = PaginationContext.getPaginationBean();
		bean.setPageBean(pageBean);
		return customerInfoDao.queryBySelective(bean);
	}

	public Integer getCustomerListCounts(CustomerInfo bean) {
		// TODO Auto-generated method stub
		return customerInfoDao.queryCountBySelective(bean);
	}

	public CustomerInfo getCustomer(CustomerInfo bean) {
		// TODO Auto-generated method stub
		return (CustomerInfo) customerInfoDao.selectByEntityId(bean);
	}

	public int modify(CustomerInfo bean) {
		// TODO Auto-generated method stub
		return customerInfoDao.updateByPrimaryKeySelective(bean);
	}

	public void add(CustomerInfo bean) {
		customerInfoDao.insert(bean);

	}

	public void destory(CustomerInfo bean) {
		customerInfoDao.deleteByPrimaryKey(bean);

	}

}
